#include<iostream>
#include<string>
#include<future>
#include<memory>


int Add(int num1 ,int num2)
{
    return num1 + num2;
}



int main()
{
    //1.
    std::promise<int> pro;
    std::future<int> result_future = pro.get_future();

    std::thread thread2([&pro](){
        int sum =Add(25,66);
        pro.set_value(sum);
    }); 
    
    std::cout<<result_future.get() <<std::endl;
    thread2.join();
    return 0;
}